<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/loading.min.css" />
<link href="fonts/iconfont.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<div id="app">
	<header class="mui-bar mui-bar-nav in-bar">    
		<a href="javascript:window.hostory.go(-1)" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">发表爆料</h1>
	</header> 
	
	<div class="mui-content">
		<div class="form inline-form">
			<li>
				<p>
					<input type="text" v-model="title" class="mui-input-clear" placeholder="标题">
				</p>
			</li>
			<li>
				<label>反馈内容</label>
				<p>	
					<textarea v-model="content" placeholder="说点什么" style="height:100px"></textarea>
				</p>
			</li>
			<li>
				<label>请填写您的联系方式</label>
				<p>
					<input type="text" v-model="contact" class="mui-input-clear" placeholder="微信/手机(选填、仅工作人员可见)">
				</p>
			</li>
		</div>
		
		<div style="margin: 10px;">
	    	<button type="button" v-on:tap="submit" class="mui-btn mui-btn-warning mui-btn-block" style="padding: 10px 30px; background: #FFAA07;">发布</button>
	    	<p class="mui-text-center">行业智库·领先咨询·数据终端·重大行情·政策研究</p>
	    </div>
	</div>	
</div>
<script src="js/mui.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/loading.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript" charset="utf-8">	
app.init();
if (!app.checkLogin()) {
	window.location.href='login.htm';
};
var vm = new Vue({
	el:"#app",
	data:{
		title : '',
		content : '',
		contact:''
	},
	methods:{
		goUrl : function(url){
			window.location.href=url;
		},
		tab(index) {
            this.type = index;
        },
		submit : function(){
			that = this;
			if(that.content==''){
				mui.toast("请输入反馈内容");
				return;
			}
			if(that.title==''){
				mui.toast("请输标题");
				return;
			}
			
			mui.showLoading();
			request = {
				content:that.content
			};		
			url = api+'?command=20&id='+uuid+'&contact='+that.contact+"&title="+that.title
			mui.post(url,request,function(res){//文章列表
				mui.hideLoading();
				if(res.response.code==0){
					mui.alert('信息提交成功',function(){
						window.location.href="setting.htm";
					})					
				}else{
					mui.toast(res.response.desc)
				}		
				
			},'json');
		}
	},
	created : function(){		
		
	},
	updated : function(){
		
	}
});
</script>
</body>
</html>